home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
edit
/
me_cd25.zip
/
ME2MUTT.ZIP
/
CLOCK.MUT
< prev
next >
Wrap
Text File
|
1992-11-09
|
931b
|
33 lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;; Clock ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(int clock-process-id)
(bool clock-running)
(defun
MAIN { (register-hook PROCESS-HOOK "process-time-hook") }
clock
{
(if (clock-running) { (msg "Clock already running!")(done) })
(clock-process-id (create-process "ticker"))
(if (== -1 clock-process-id) (done)) ;; some kind of error
(clock-running TRUE)
}
process-time-hook (int pid event-type)(message)
{
(if (== PERROR event-type)
{ (clock-running FALSE)(modeline-message "")(done) })
(if (not (clock-running)) (done))
(if (!= clock-process-id pid) (done))
(switch event-type
PROCESS-DONE (clock-running FALSE)
OUTPUT-STDOUT (modeline-message message)
)
(update) ;; ??
}
)